﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE ProductTypes_procSelectByCode
	@ProductTypeCode	VARCHAR(5)
AS	
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	SELECT	ProductTypeID,
			ProductTypeCode,
			ProductTypeName
	FROM	ProductTypes
	WHERE	ProductTypeCode = @ProductTypeCode

END


GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
ALTER PROCEDURE ProductTypes_procUpdate
	@ProductTypeID		INT,
	@ProductTypeCode	VARCHAR(5),
	@ProductTypeName	NVARCHAR(50)
AS	
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	UPDATE	ProductTypes
	SET		ProductTypeName = @ProductTypeName
	WHERE	ProductTypeID = @ProductTypeID

END
GO



-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE ServiceTypes_procDelete
	@ServiceTypeID		INT
AS	
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	DELETE	FROM	ServiceTypes
	WHERE	ServiceTypeID = @ServiceTypeID

END
GO



GO
/****** Object:  StoredProcedure [dbo].[ServiceTypes_procUpdate]    Script Date: 04/29/2014 14:45:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ServiceTypes_procUpdate]
	@ServiceTypeID		INT,
	@ServiceTypeCode	VARCHAR(5),
	@ServiceTypeName	NVARCHAR(50)
AS	
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	UPDATE	ServiceTypes
	SET		ServiceTypeName = @ServiceTypeName
	WHERE	ServiceTypeID = @ServiceTypeID

END
GO



GO
/****** Object:  StoredProcedure [dbo].[ServiceTypes_procSelectByID]    Script Date: 04/29/2014 14:45:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ServiceTypes_procSelectByID]
	@ServiceTypeID int
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT	ServiceTypeID,
			ServiceTypeCode,
			ServiceTypeName
	FROM	ServiceTypes
	WHERE	ServiceTypeID = @ServiceTypeID
END
GO



GO
/****** Object:  StoredProcedure [dbo].[ServiceTypes_procSelectByCode]    Script Date: 04/29/2014 14:45:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ServiceTypes_procSelectByCode]
	@ServiceTypeCode	VARCHAR(5)
AS	
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	SELECT	ServiceTypeID,
			ServiceTypeCode,
			ServiceTypeName
	FROM	ServiceTypes
	WHERE	ServiceTypeCode = @ServiceTypeCode

END
GO



GO
/****** Object:  StoredProcedure [dbo].[ServiceTypes_procSelectAll]    Script Date: 04/29/2014 14:45:42 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ServiceTypes_procSelectAll] 
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT	ServiceTypeID,
			ServiceTypeCode,
			ServiceTypeName
	FROM	ServiceTypes
END
GO



GO
/****** Object:  StoredProcedure [dbo].[ServiceTypes_procInsert]    Script Date: 04/29/2014 14:45:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ServiceTypes_procInsert]
	@ServiceTypeCode	VARCHAR(5),
	@ServiceTypeName	NVARCHAR(50)
AS	
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	-- Insert statements for procedure here
	INSERT INTO ServiceTypes(ServiceTypeCode, ServiceTypeName)
	VALUES(@ServiceTypeCode, @ServiceTypeName)

END
GO



